//
//  swift
//  Charts
//
//  Created by 尹琼 on 2022/10/26.
//

import UIKit


// MARK: 屏幕尺寸相关
/// 屏幕的宽
public let kScreenWidth = UIScreen.main.bounds.width
/// 屏幕的高
public let kScreenHeight = UIScreen.main.bounds.height

/// 是否是iphonex系列
public var iPhoneXSeries: Bool {
    let window = UIApplication.shared.delegate?.window
    guard #available(iOS 11.0, *),
          (window??.safeAreaInsets.bottom ?? 0.0) > 0.0 else {
        return false
    }
    return true
}
// MARK: 安全距离相关
/// 状态栏高度
public let kStatusBarHeight = iPhoneXSeries ? 44.0 : 20.0
/// 导航栏高度
public let kNavigationBarHeight = 44.0
/// 顶部导航栏高度(状态栏和导航栏的高度)
public let kNavHeight = kStatusBarHeight + kNavigationBarHeight
/// 底部安全区域丢高度
public let kSafeBottomMargin = iPhoneXSeries ? 34.0 : 0.0
/// 底部安全区域总高度
public let kSafeMarginHeight = kNavHeight + kSafeBottomMargin
/// 标签栏高度
public let kTabbarHeight = iPhoneXSeries ? (49.0 + kSafeBottomMargin) : 49.0

